<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8">
    <title>1table模块快速使用</title>
    <link th:href="@{/lib/layui/css/layui.css}" rel="stylesheet" href="/lib/layui/css/layui.css" media="all">
    <link th:href="@{/css/style.css}" rel="stylesheet" href="/css/style.css" media="all">
</head>
<body class="">
<div class="layui-container">

    <div th:replace="common/fragment :: search"></div>

    <div class="layui-row">
        <div id="test1"></div>
    </div>
    <div class="layui-row">
        405

        你没有权限访问该页面
    </div>

    <!--<div th:replace="common/fragment :: page"></div>-->
</div>

<div th:replace="common/template :: footer"></div>
<div th:replace="common/template :: script"></div>
<script>
    layui.use(['element','form','jquery','layer'], function () {
        var $ = layui.jquery;
        var form = layui.form;
        var layer = layui.layer;

        form.on('submit(formDemo)', function(data){
            console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
            $.post("/login",data.field,function (resp) {
                if (resp.code == 1) {
                    layer.msg("成功");
                    setTimeout(function () {
                        location.href = "/archives/index";
                    }, 1000);
                }else{
                    layer.msg(resp.msg);
                }
            })
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>

</body>
</html>